#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <set>
#include <queue>

using namespace std;
using LL = long long;
using PII = pair<int, int>;

const int N = 60;

int n;
unordered_map<string, int> mp;
string s[N];
char s1[5] = {'H', 'D', 'C', 'S'};  // 4
char s2[100] = {'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'}; // 13


bool check(string s){
    bool ok = false;
    for(int i = 0; i < 4; i ++){
        if(s[0] == s1[i]) ok = true;
    }

    if(!ok) return false;
    ok = false;

    for(int i = 0; i < 13; i ++){
        if(s[1] == s2[i]) ok = true;
    }

    if(!ok) return false;
    return true;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n;
    for(int i = 1; i <= n; i ++) cin >> s[i];

    for(int i = 1; i <= n; i ++){
        if(!check(s[i])){
            cout << "No" << '\n';
            exit(0);
        }

        if(mp.count(s[i])) {
            cout << "No" << '\n';
            exit(0);
        }else{
            mp[s[i]] = 1;
        }

        
    }

    cout << "Yes" << '\n';
    return 0;
}